<br/>
<div class="bg_greenyellow round_10 quarter shadow_in_0">
    <center>
        <a href="
            <?php 
            echo $this->url(
                    array('controller' => 'offers', 
                        'action' => 'show',
                        'id'=>$this->offer->getHeadOffer_id() ), 
                        null, 
                        true);
            ?>" >
            Powrót do głównej oferty
        </a>
    </center>  
</div> 
<br/>
<?  $title = "Edycja oferty ".$this->offer->getOffer_id(); 
echo $this->partial('partials/_sectionTitle.phtml', 
            array('title' => $title
               ));
?>
<div class="full">
    <div id="Offer<? echo $this->offer->getOffer_id(); ?>">
        <?
            echo $this->partial('partials/_editableOffer.phtml', 
                array('offer' => $this->offer));
        ?>
    </div>
</div>
<br/> 
<div id='offer<? echo $this->offer->getOffer_id(); ?>Edit' class="vpad_10 full">
    <?
        echo $this->form;
    ?>
</div>
<? if(!empty($this->usersComms)) {?>
<div class="vpad_10 full">
    <?  
echo $this->partial('partials/_sectionTitle.phtml', 
            array('title' => 'Towary użytkownika')); ?>
    <table class="datalist" style="width: 50%">
    <? foreach ($this->usersComms as $comm) {
        echo '<div>'.$this->partial('partials/_addNewCommodity.phtml', 
            array('commodity' => $comm,
                'offer' => $this->offer)).'</div>';
    } ?>
    </table>
</div>
<? }
    if(!empty($this->actionsComms)) {
?>
<div class="vpad_10 full">
    <?  
    echo $this->partial('partials/_sectionTitle.phtml', 
            array('title' => 'Towary z aukcji')); ?>
    
</div>
<? } ?>
<div id='offer<? echo $this->offer->getOffer_id(); ?>NewItems' class="vpad_10 full">
    <table class="datalist" style="width: 50%">
        <? foreach ($this->actionsComms as $comm) {
        echo '<div>'.$this->partial('partials/_addCommodity.phtml', 
            array('commodity' => $comm,
                'offer' => $this->offer)).'</div>';
    } ?>
    </table>
</div>

<? if($this->groupForm != null) {?>
<div class="vpad_10 full">
    <?  
    echo $this->partial('partials/_sectionTitle.phtml', 
            array('title' => 'Dołącz grupę')); 
    echo $this->groupForm;
    ?>
</div>
<? } ?>

<div class="vpad_10 full">
    <?  
    echo $this->partial('partials/_sectionTitle.phtml', 
            array('title' => 'Usuń ofertę')); ?>
    
        <a href="
            <?php 
            echo $this->url(
                    array('controller' => 'offers', 
                        'action' => 'delete',
                        'id'=>$this->offer->getOffer_id() ), 
                        null, 
                        true);
            ?>" class="styled_button grey delete_button">
            Usuń
        </a>
</div>
